/*
Date:20210428 13:53pm
key:这题真是对异或操作的经典诠释，从头异或到尾
*/
class Solution {
public:
    int singleNumber(vector<int>& nums) 
    {
        //if(nums.size()==0){return }
        int re;
        re=nums[0];
        for(int i=1;i<nums.size();i++)
        {
            re^=nums[i];
        }
        return re;
    }
};